﻿using System;
using FBGraph.Controllers.Connections.Groups;
using FBGraph.Models;

namespace FBGraph.Controllers
{
    public partial class GroupsController : IFBGraphPrimaryController<Group>, IFBGraphSearchController<Group>
    {
        /// <summary>Initializes subcontrollers contained by <see cref="GroupsController" />.</summary>
        protected override void InitSubcontrollers()
        {
            this.Members = new MembersController(Context);
        }

        /// <summary>Gets a reference to a <see cref="MembersController" />, which provides access to the members connection for groups.</summary>
        public MembersController Members { get; private set; }

        #region [ IFBGraphSearchController<Group> Members ]

        String IFBGraphSearchController<Group>.SearchType
        {
            get { return "group"; }
        }

        #endregion
    }
}